<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/mb/jsp/common.jsp" %>
<%@ page language="java" import="com.limao.Model.PublicData"%>
<%@ page language="java" import="com.limao.DBDataClass.CrowdUserAuthClass"%>
 <%
 int sysTest=WebFunction.getSysTest();
 int userTest=1;
 int flagTest=1;
 if(sysTest==0)
 {
 	flagTest=0;
 }
 else
 {
	 String userid=(String)CacheClass.isLogin(request,response);
	 if(CacheClass.getIntValue(userid)!=0)
	 {
		 CrowdUserAuthClass user= WebFunction.getUserInfo(request,response);
		 userTest=CacheClass.getIntValue(user.userTest);
		 if(userTest==1)
		 {
		 	flagTest=1;
		 }
		 else
		 {
		 	flagTest=0;
		 }
	 } 
	 else
	 {
	 	flagTest=1;
	 }
 
 }
 

 
 %>
 
    <a id="headertab1" onclick="window.location.href='mb/jsp/index.jsp'" href="javascript:void(0);" >
        <img id="headerimg1" src="mb/images/f1.png" class="db jz">
        <span class="db tc">首页</span>
    </a>
    <a id="headertab2" onclick="toBaitiaoPage();" href="javascript:void(0);">
        <img id="headerimg2" src="mb/images/f2.png" class="db jz">
        <span class="db tc">邀约</span>
    </a>
    <a id="headertab3" onclick="toMoneyManagementPage();" href="javascript:void(0);">
        <img id="headerimg3" src="mb/images/f3.png" class="db jz">
        <span class="db tc">寄售</span>
    </a>
    <a id="headertab4" onclick="window.location.href='mb/jsp/rankingList.jsp'" href="javascript:void(0);">
        <img id="headerimg4" src="mb/images/f4.png" class="db jz">
        <span class="db tc">排名</span>
    </a>
    <a id="headertab5" onclick="toPersonalPage();" href="javascript:void(0);">
        <img id="headerimg5" src="mb/images/f5.png" class="db jz">
        <span class="db tc">我的</span>
    </a>
    
    <script>
    
    
    function footerTab(headertabcurrent){
		var headertabcurrent = headertabcurrent;
		
	  $('#headertab1').removeClass('footerTab_current');
	  $('#headertab2').removeClass('footerTab_current');
	  $('#headertab3').removeClass('footerTab_current');
	  $('#headertab4').removeClass('footerTab_current');
	  $('#headertab5').removeClass('footerTab_current');
	  
	  $('#headerimg1').attr('src','mb/images/f1.png');
	  $('#headerimg2').attr('src','mb/images/f2.png');
	  $('#headerimg3').attr('src','mb/images/f3.png');
	  $('#headerimg4').attr('src','mb/images/f4.png');
	  $('#headerimg5').attr('src','mb/images/f5.png');
	  
	  switch(headertabcurrent)
	  {
	  case 1:
		  	console.log(headertabcurrent);
		   $('#headertab1').addClass('footerTab_current');
		   $('#headerimg1').attr('src','mb/images/f11.png');
		   break;
	  case 2:
		  
		   $('#headertab2').addClass('footerTab_current');
		   $('#headerimg2').attr('src','mb/images/f22.png');
		   break;
	  case 3:
		   $('#headertab3').addClass('footerTab_current');
		   $('#headerimg3').attr('src','mb/images/f33.png');
		   break;
	  case 4:
		   $('#headertab4').addClass('footerTab_current');
		   $('#headerimg4').attr('src','mb/images/f44.png');
		   break;
	  case 5:
		   $('#headertab5').addClass('footerTab_current');
		   $('#headerimg5').attr('src','mb/images/f55.png');
		   break;
	  }

	}

/*     
	$(document).ready(function(){
		//loginChanage();
	}); */
	
	 function toPersonalPage() {
        if (islogin)
            window.location.href = 'mb/jsp/personalAll.jsp';
        else
            window.location.href = 'mb/jsp/login.jsp';
    }

    function toBaitiaoPage() {
        if (islogin)
            window.location.href = 'mb/jsp/myQRcode.jsp';
        else
            window.location.href = 'mb/jsp/login.jsp';
    }

    function toMoneyManagementPage() {
        if (islogin)
            //window.location.href = 'mb/jsp/virtualCurrencyInvestment.jsp';
            window.location.href = 'mb/jsp/sale.jsp';
        else
            window.location.href = 'mb/jsp/login.jsp';
    }
    
    function toMyOrderPage() {
        if (islogin)
            window.location.href = 'mb/jsp/myOrder.jsp';
        else
            window.location.href = 'mb/jsp/login.jsp';
          
    }
	
</script>	